<AutoComplete @bind-Value="@value" OnInput="OnSearch" Options="@options" OnSelectionChange="OnChange" OnActiveChange="OnSelect " Placeholder="input here" />
<Divider></Divider>
<span>bind-Value:@value</span>
<br />
<span>SelectedValue:@selectItem?.Value</span>
<br />
<span>ActiveValue:@activeItem?.Value</span>

@code
{
    static string mockVal(string str, int repeat) => new int[repeat].Aggregate("", (a, _) => a + str);

    private string value;

    List<string> options = [];

    private AutoCompleteOption selectItem;
    private AutoCompleteOption activeItem;

    void OnSearch(ChangeEventArgs e)
    {
        var searchText = e.Value.ToString();
        options = string.IsNullOrEmpty(searchText) ? [] : [mockVal(searchText, 1), mockVal(searchText, 2), mockVal(searchText, 3)];
    }

    void OnChange(AutoCompleteOption item)
    {
        selectItem = item;
    }

    void OnSelect(AutoCompleteOption item)
    {
        activeItem = item;
    }
}